clear
clear matrix
clear mata
set matsize 10000
set maxvar 10000
capture log close
local path "D:\BJP\WageShocks\ReplicationFiles"
log using `path'\LogFiles\OES_Empirical_Analysis.log, replace

** Format Technology Price Variables for Time Trend**
use `path'\RawData\tech_cpi
replace year=year+3
keep if year>=2003 & year<2019
egen mean_comp_ppi=mean(comp_ppi)
egen sd_comp_ppi=sd(comp_ppi)
replace comp_ppi=(comp_ppi-mean_comp_ppi)/sd_comp_ppi
egen mean_pos_ppi=mean(pos_ppi)
egen sd_pos_ppi=sd(pos_ppi)
replace pos_ppi=(pos_ppi-mean_pos_ppi)/sd_pos_ppi
keep year tech_cpi comp_ppi pos_ppi
save `path'\FormattedData\tech_cpi2, replace
clear

** Format Minimum Wage Level for Time Trend Analysis **
use `path'\FormattedData\OES_Analysis_Data, replace
collapse (mean) mw, by(year)
egen mean_mw=mean(mw)
egen sd_mw=sd(mw)
gen mw_level=(mw-mean_mw)/sd_mw
keep year mw_level
replace year=year+3
save `path'\FormattedData\mw_level, replace
clear

** Bring Data Together **
use `path'\FormattedData\OES_Analysis_Data, replace
merge m:1 year using `path'\FormattedData\tech_cpi2
keep if _merge==3
drop _merge nr_cog_anal* nr_cog_pers* r_cog* r_man* nr_man_phys* nr_man_pers* ave_* state_yr1_* state_yr2_* state_yr3_* state_yr4_*
merge m:1 year using `path'\FormattedData\mw_level
keep if _merge==3
drop _merge 
drop if year<2003

** Table 2**
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store all0
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RCS01
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RCS0

** Table 3 **
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RMS0
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store Int0
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RS0
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_NRCogASh_* MW_Ch_This_Yr_X_NRCogASh_* MW_Ch_Last_Yr_X_NRCogASh_* MW_Ch_2Yrs_Ago_X_NRCogASh_* lgr_orig_emp4_* group_dum*  gr_NRCogASh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store NRCA0
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_NRManPhysSh_* MW_Ch_This_Yr_X_NRManPhysSh_* MW_Ch_Last_Yr_X_NRManPhysSh_* MW_Ch_2Yrs_Ago_X_NRManPhysSh_* lgr_orig_emp4_* group_dum*  gr_NRManPhysSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store NRMP0

*************
** Table 4 **
*************

** All Year Estimates **
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RCS1
lincom MW_Ch_2Yrs_Ago_X_RoutineSh_1-MW_Ch_Next_Yr_X_RoutineSh_1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RMS1
lincom MW_Ch_2Yrs_Ago_X_RoutineSh2_1-MW_Ch_Next_Yr_X_RoutineSh2_1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store Int1
lincom MW_Ch_2Yrs_Ago_X_IntSh_1-MW_Ch_Next_Yr_X_IntSh_1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RS1

**  Linear Time Trends (Table 4) **
gen tt=year-2003

forvalues g=1/4{
foreach task_var in "RoutineSh" "RoutineSh2" "RoutineSh3" "IntSh"{
gen tt_MW_Ch_Next_Yr_X_`task_var'_`g'=MW_Ch_Next_Yr_X_`task_var'*group_dum`g'*tt
gen tt_MW_Ch_This_Yr_X_`task_var'_`g'=MW_Ch_This_Yr_X_`task_var'*group_dum`g'*tt
gen tt_MW_Ch_Last_Yr_X_`task_var'_`g'=MW_Ch_Last_Yr_X_`task_var'*group_dum`g'*tt
gen tt_MW_Ch_2Yrs_Ago_X_`task_var'_`g'=MW_Ch_2Yrs_Ago_X_`task_var'*group_dum`g'*tt
}
gen group_tt_dum`g'=tt*group_dum`g'
}

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* tt_MW_Ch_Next_Yr_X_RoutineSh_* tt_MW_Ch_This_Yr_X_RoutineSh_* tt_MW_Ch_Last_Yr_X_RoutineSh_* tt_MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_tt_dum*  state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RCS2
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* tt_MW_Ch_Next_Yr_X_RoutineSh_* tt_MW_Ch_This_Yr_X_RoutineSh_* tt_MW_Ch_Last_Yr_X_RoutineSh_* tt_MW_Ch_2Yrs_Ago_X_RoutineSh_2 tt_MW_Ch_2Yrs_Ago_X_RoutineSh_3 tt_MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_tt_dum*  state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_tt_rcs=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* tt_MW_Ch_Next_Yr_X_RoutineSh2_* tt_MW_Ch_This_Yr_X_RoutineSh2_* tt_MW_Ch_Last_Yr_X_RoutineSh2_* tt_MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_tt_dum*  state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RMS2
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* tt_MW_Ch_Next_Yr_X_RoutineSh2_* tt_MW_Ch_This_Yr_X_RoutineSh2_* tt_MW_Ch_Last_Yr_X_RoutineSh2_* tt_MW_Ch_2Yrs_Ago_X_RoutineSh2_2 tt_MW_Ch_2Yrs_Ago_X_RoutineSh2_3 tt_MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_tt_dum*  state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_tt_rms=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* tt_MW_Ch_Next_Yr_X_IntSh_* tt_MW_Ch_This_Yr_X_IntSh_* tt_MW_Ch_Last_Yr_X_IntSh_* tt_MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* group_tt_dum*  state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store Int2
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* tt_MW_Ch_Next_Yr_X_IntSh_* tt_MW_Ch_This_Yr_X_IntSh_* tt_MW_Ch_Last_Yr_X_IntSh_* tt_MW_Ch_2Yrs_Ago_X_IntSh_2 tt_MW_Ch_2Yrs_Ago_X_IntSh_3 tt_MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum*  gr_IntSh_* group_tt_dum*  state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_tt_int=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* tt_MW_Ch_Next_Yr_X_RoutineSh3_* tt_MW_Ch_This_Yr_X_RoutineSh3_* tt_MW_Ch_Last_Yr_X_RoutineSh3_* tt_MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_tt_dum* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RS2
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* tt_MW_Ch_Next_Yr_X_RoutineSh3_* tt_MW_Ch_This_Yr_X_RoutineSh3_* tt_MW_Ch_Last_Yr_X_RoutineSh3_* tt_MW_Ch_2Yrs_Ago_X_RoutineSh3_2 tt_MW_Ch_2Yrs_Ago_X_RoutineSh3_3 tt_MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_tt_dum* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_tt_rs=(v1-v2)/v3

drop  tt_* group_tt_* 

** Time Trends Associated with MW level (Table 4 continued) **
forvalues g=1/4{
foreach task_var in "RoutineSh" "RoutineSh2" "RoutineSh3" "IntSh"{
gen m0_MW_Ch_Next_Yr_X_`task_var'_`g'=MW_Ch_Next_Yr_X_`task_var'*group_dum`g'*mw_level
gen m0_MW_Ch_This_Yr_X_`task_var'_`g'=MW_Ch_This_Yr_X_`task_var'*group_dum`g'*mw_level
gen m0_MW_Ch_Last_Yr_X_`task_var'_`g'=MW_Ch_Last_Yr_X_`task_var'*group_dum`g'*mw_level
gen m0_MW_Ch_2Yrs_Ago_X_`task_var'_`g'=MW_Ch_2Yrs_Ago_X_`task_var'*group_dum`g'*mw_level
gen  gr_m0_`task_var'_`g'=`task_var'*group_dum`g'*mw_level
}
gen group_m0_dum`g'=mw_level*group_dum`g'
}

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* m0_MW_Ch_Next_Yr_X_RoutineSh_* m0_MW_Ch_This_Yr_X_RoutineSh_* m0_MW_Ch_Last_Yr_X_RoutineSh_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_m0_dum*  gr_m0_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RCS3
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* m0_MW_Ch_Next_Yr_X_RoutineSh_* m0_MW_Ch_This_Yr_X_RoutineSh_* m0_MW_Ch_Last_Yr_X_RoutineSh_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh_2 m0_MW_Ch_2Yrs_Ago_X_RoutineSh_3 m0_MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_m0_dum*  gr_m0_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_mw2_rcs=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* m0_MW_Ch_Next_Yr_X_RoutineSh2_* m0_MW_Ch_This_Yr_X_RoutineSh2_* m0_MW_Ch_Last_Yr_X_RoutineSh2_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_m0_dum*  gr_m0_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RMS3
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* m0_MW_Ch_Next_Yr_X_RoutineSh2_* m0_MW_Ch_This_Yr_X_RoutineSh2_* m0_MW_Ch_Last_Yr_X_RoutineSh2_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_2 m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_3 m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_m0_dum*  gr_m0_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_mw2_rms=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* m0_MW_Ch_Next_Yr_X_IntSh_* m0_MW_Ch_This_Yr_X_IntSh_* m0_MW_Ch_Last_Yr_X_IntSh_* m0_MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* group_m0_dum*  gr_m0_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store Int3
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* m0_MW_Ch_Next_Yr_X_IntSh_* m0_MW_Ch_This_Yr_X_IntSh_* m0_MW_Ch_Last_Yr_X_IntSh_* m0_MW_Ch_2Yrs_Ago_X_IntSh_2 m0_MW_Ch_2Yrs_Ago_X_IntSh_3 m0_MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum*  gr_IntSh_* group_m0_dum*  gr_m0_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_mw2_int=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* m0_MW_Ch_Next_Yr_X_RoutineSh3_* m0_MW_Ch_This_Yr_X_RoutineSh3_* m0_MW_Ch_Last_Yr_X_RoutineSh3_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_m0_dum*  gr_m0_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RS3
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* m0_MW_Ch_Next_Yr_X_RoutineSh3_* m0_MW_Ch_This_Yr_X_RoutineSh3_* m0_MW_Ch_Last_Yr_X_RoutineSh3_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_2 m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_3 m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_m0_dum*  gr_m0_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_mw2_rs=(v1-v2)/v3

** Time Trends Associated with Technology Prices (Table 4, continued)**
forvalues g=1/4{
foreach task_var in "RoutineSh" "RoutineSh2" "RoutineSh3" "IntSh"{
gen p_MW_Ch_Next_Yr_X_`task_var'_`g'=MW_Ch_Next_Yr_X_`task_var'*group_dum`g'*pos_ppi
gen p_MW_Ch_This_Yr_X_`task_var'_`g'=MW_Ch_This_Yr_X_`task_var'*group_dum`g'*pos_ppi
gen p_MW_Ch_Last_Yr_X_`task_var'_`g'=MW_Ch_Last_Yr_X_`task_var'*group_dum`g'*pos_ppi
gen p_MW_Ch_2Yrs_Ago_X_`task_var'_`g'=MW_Ch_2Yrs_Ago_X_`task_var'*group_dum`g'*pos_ppi

gen c_MW_Ch_Next_Yr_X_`task_var'_`g'=MW_Ch_Next_Yr_X_`task_var'*group_dum`g'*comp_ppi
gen c_MW_Ch_This_Yr_X_`task_var'_`g'=MW_Ch_This_Yr_X_`task_var'*group_dum`g'*comp_ppi
gen c_MW_Ch_Last_Yr_X_`task_var'_`g'=MW_Ch_Last_Yr_X_`task_var'*group_dum`g'*comp_ppi
gen c_MW_Ch_2Yrs_Ago_X_`task_var'_`g'=MW_Ch_2Yrs_Ago_X_`task_var'*group_dum`g'*comp_ppi

gen  gr_p_`task_var'_`g'=`task_var'*group_dum`g'*pos_ppi
gen  gr_c_`task_var'_`g'=`task_var'*group_dum`g'*comp_ppi
}
gen group_p_dum`g'=pos_ppi*group_dum`g'
gen group_c_dum`g'=comp_ppi*group_dum`g'
}

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* p_MW_Ch_Next_Yr_X_RoutineSh_* p_MW_Ch_This_Yr_X_RoutineSh_* p_MW_Ch_Last_Yr_X_RoutineSh_* p_MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_p_dum*  gr_p_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RCS5
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* p_MW_Ch_Next_Yr_X_RoutineSh_* p_MW_Ch_This_Yr_X_RoutineSh_* p_MW_Ch_Last_Yr_X_RoutineSh_* p_MW_Ch_2Yrs_Ago_X_RoutineSh_2 p_MW_Ch_2Yrs_Ago_X_RoutineSh_3 p_MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_p_dum*  gr_p_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_pos_rcs=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* p_MW_Ch_Next_Yr_X_RoutineSh2_* p_MW_Ch_This_Yr_X_RoutineSh2_* p_MW_Ch_Last_Yr_X_RoutineSh2_* p_MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_p_dum*  gr_p_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RMS5
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* p_MW_Ch_Next_Yr_X_RoutineSh2_* p_MW_Ch_This_Yr_X_RoutineSh2_* p_MW_Ch_Last_Yr_X_RoutineSh2_* p_MW_Ch_2Yrs_Ago_X_RoutineSh2_2 p_MW_Ch_2Yrs_Ago_X_RoutineSh2_3 p_MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_p_dum*  gr_p_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_pos_rms=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* p_MW_Ch_Next_Yr_X_IntSh_* p_MW_Ch_This_Yr_X_IntSh_* p_MW_Ch_Last_Yr_X_IntSh_* p_MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* group_p_dum*  gr_p_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store Int5
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* p_MW_Ch_Next_Yr_X_IntSh_* p_MW_Ch_This_Yr_X_IntSh_* p_MW_Ch_Last_Yr_X_IntSh_* p_MW_Ch_2Yrs_Ago_X_IntSh_2 p_MW_Ch_2Yrs_Ago_X_IntSh_3 p_MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum*  gr_IntSh_* group_p_dum*  gr_p_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_pos_int=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* p_MW_Ch_Next_Yr_X_RoutineSh3_* p_MW_Ch_This_Yr_X_RoutineSh3_* p_MW_Ch_Last_Yr_X_RoutineSh3_* p_MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_p_dum*  gr_p_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RS5
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* p_MW_Ch_Next_Yr_X_RoutineSh3_* p_MW_Ch_This_Yr_X_RoutineSh3_* p_MW_Ch_Last_Yr_X_RoutineSh3_* p_MW_Ch_2Yrs_Ago_X_RoutineSh3_2 p_MW_Ch_2Yrs_Ago_X_RoutineSh3_3 p_MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_p_dum*  gr_p_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_pos_rs=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* c_MW_Ch_Next_Yr_X_RoutineSh_* c_MW_Ch_This_Yr_X_RoutineSh_* c_MW_Ch_Last_Yr_X_RoutineSh_* c_MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_c_dum*  gr_c_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RCS4
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* c_MW_Ch_Next_Yr_X_RoutineSh_* c_MW_Ch_This_Yr_X_RoutineSh_* c_MW_Ch_Last_Yr_X_RoutineSh_* c_MW_Ch_2Yrs_Ago_X_RoutineSh_2 c_MW_Ch_2Yrs_Ago_X_RoutineSh_3 c_MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_c_dum*  gr_c_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_c_rcs=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* c_MW_Ch_Next_Yr_X_RoutineSh2_* c_MW_Ch_This_Yr_X_RoutineSh2_* c_MW_Ch_Last_Yr_X_RoutineSh2_* c_MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_c_dum*  gr_c_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RMS4
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* c_MW_Ch_Next_Yr_X_RoutineSh2_* c_MW_Ch_This_Yr_X_RoutineSh2_* c_MW_Ch_Last_Yr_X_RoutineSh2_* c_MW_Ch_2Yrs_Ago_X_RoutineSh2_2 c_MW_Ch_2Yrs_Ago_X_RoutineSh2_3 c_MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_c_dum*  gr_c_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_c_rms=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* c_MW_Ch_Next_Yr_X_IntSh_* c_MW_Ch_This_Yr_X_IntSh_* c_MW_Ch_Last_Yr_X_IntSh_* c_MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* group_c_dum*  gr_c_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store Int4
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* c_MW_Ch_Next_Yr_X_IntSh_* c_MW_Ch_This_Yr_X_IntSh_* c_MW_Ch_Last_Yr_X_IntSh_* c_MW_Ch_2Yrs_Ago_X_IntSh_2 c_MW_Ch_2Yrs_Ago_X_IntSh_3 c_MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum*  gr_IntSh_* group_c_dum*  gr_c_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_c_int=(v1-v2)/v3

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* c_MW_Ch_Next_Yr_X_RoutineSh3_* c_MW_Ch_This_Yr_X_RoutineSh3_* c_MW_Ch_Last_Yr_X_RoutineSh3_* c_MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_c_dum*  gr_c_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
estimates store RS4
drop v1 v2 v3
gen v1=e(mss)
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* c_MW_Ch_Next_Yr_X_RoutineSh3_* c_MW_Ch_This_Yr_X_RoutineSh3_* c_MW_Ch_Last_Yr_X_RoutineSh3_* c_MW_Ch_2Yrs_Ago_X_RoutineSh3_2 c_MW_Ch_2Yrs_Ago_X_RoutineSh3_3 c_MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_c_dum*  gr_c_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
gen v2=e(mss)
gen v3=e(rss)
gen pr2_c_rs=(v1-v2)/v3

**** Include Both Minimum Wage Levels and POS Technology Prices ****
**reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* p_MW_Ch_Next_Yr_X_RoutineSh_* p_MW_Ch_This_Yr_X_RoutineSh_* p_MW_Ch_Last_Yr_X_RoutineSh_* p_MW_Ch_2Yrs_Ago_X_RoutineSh_* m0_MW_Ch_Next_Yr_X_RoutineSh_* m0_MW_Ch_This_Yr_X_RoutineSh_* m0_MW_Ch_Last_Yr_X_RoutineSh_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* group_p_dum*  gr_p_RoutineSh_* group_m0_dum*  gr_m0_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
**estimates store RCS6
**reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* p_MW_Ch_Next_Yr_X_RoutineSh2_* p_MW_Ch_This_Yr_X_RoutineSh2_* p_MW_Ch_Last_Yr_X_RoutineSh2_* p_MW_Ch_2Yrs_Ago_X_RoutineSh2_* m0_MW_Ch_Next_Yr_X_RoutineSh2_* m0_MW_Ch_This_Yr_X_RoutineSh2_* m0_MW_Ch_Last_Yr_X_RoutineSh2_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* group_p_dum*  gr_p_RoutineSh2_* group_m0_dum*  gr_m0_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
**estimates store RMS6
**reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* p_MW_Ch_Next_Yr_X_IntSh_* p_MW_Ch_This_Yr_X_IntSh_* p_MW_Ch_Last_Yr_X_IntSh_* p_MW_Ch_2Yrs_Ago_X_IntSh_* m0_MW_Ch_Next_Yr_X_IntSh_* m0_MW_Ch_This_Yr_X_IntSh_* m0_MW_Ch_Last_Yr_X_IntSh_* m0_MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* group_p_dum*  gr_p_IntSh_* group_m0_dum*  gr_m0_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
**estimates store Int6
**reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* p_MW_Ch_Next_Yr_X_RoutineSh3_* p_MW_Ch_This_Yr_X_RoutineSh3_* p_MW_Ch_Last_Yr_X_RoutineSh3_* p_MW_Ch_2Yrs_Ago_X_RoutineSh3_* m0_MW_Ch_Next_Yr_X_RoutineSh3_* m0_MW_Ch_This_Yr_X_RoutineSh3_* m0_MW_Ch_Last_Yr_X_RoutineSh3_* m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* group_p_dum*  gr_p_RoutineSh3_* group_m0_dum*  gr_m0_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1, cluster(state)
**estimates store RS6


**********************************************************************
** Add More Leads and Lags in change in MW to regressions: Table A6 **
**********************************************************************
gen MW_Ch_3Yrs_Ago=ln(l3mw)-ln(l4mw)
gen MW_Ch_InTwo_Yrs=ln(f2mw)-ln(fmw)
gen MW_Ch_InThree_Yrs=ln(f3mw)-ln(f2mw)

local tasks "RoutineSh RoutineSh2 RoutineSh3 IntSh"
forvalues k=1/4{
gen MW_Ch_3Yrs_Ago_`k'=MW_Ch_3Yrs_Ago*group_dum`k'
gen MW_Ch_InTwo_Yrs_`k'=MW_Ch_InTwo_Yrs*group_dum`k'
gen MW_Ch_InThree_Yrs_`k'=MW_Ch_InThree_Yrs*group_dum`k'
foreach y of local tasks {
gen MW_Ch_3Yrs_Ago_X_`y'_`k'=MW_Ch_3Yrs_Ago*group_dum`k'*`y'
gen MW_Ch_InTwo_Yrs_X_`y'_`k'=MW_Ch_InTwo_Yrs*group_dum`k'*`y'
gen MW_Ch_InThree_Yrs_X_`y'_`k'=MW_Ch_InThree_Yrs*group_dum`k'*`y'
}
}

** Include Hike in 2Yrs **
reg ln_change_occ_employed4 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_InTwo_Yrs_2 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_InTwo_Yrs_3 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_InTwo_Yrs_4 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store all0_2lead
reg ln_change_occ_employed4 MW_Ch_InTwo_Yrs_X_IntSh_* MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store Int0_2lead
reg ln_change_occ_employed4 MW_Ch_InTwo_Yrs_X_RoutineSh3_* MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RS0_2lead

** Include Hike in 2Yrs and 3Yrs **
reg ln_change_occ_employed4 MW_Ch_InThree_Yrs_1 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_InThree_Yrs_2 MW_Ch_InTwo_Yrs_2 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_InThree_Yrs_3 MW_Ch_InTwo_Yrs_3 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_InThree_Yrs_4 MW_Ch_InTwo_Yrs_4 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store all0_3lead
reg ln_change_occ_employed4 MW_Ch_InThree_Yrs_X_IntSh_* MW_Ch_InTwo_Yrs_X_IntSh_* MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store Int0_3lead
reg ln_change_occ_employed4 MW_Ch_InThree_Yrs_X_RoutineSh3_* MW_Ch_InTwo_Yrs_X_RoutineSh3_* MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RS0_3lead

** Include Hike 3Yrs Ago **
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_3Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_3Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_3Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 MW_Ch_3Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store all0_3yr
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* MW_Ch_3Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store Int0_3yr
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* MW_Ch_3Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RS0_3yr

** Include Hike in 2Yrs & 3Yrs Ago**
reg ln_change_occ_employed4 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_3Yrs_Ago_1 MW_Ch_InTwo_Yrs_2 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_3Yrs_Ago_2 MW_Ch_InTwo_Yrs_3 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_3Yrs_Ago_3 MW_Ch_InTwo_Yrs_4 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 MW_Ch_3Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store all0_3yr2
reg ln_change_occ_employed4 MW_Ch_InTwo_Yrs_X_IntSh_* MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* MW_Ch_3Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store Int0_3yr2
reg ln_change_occ_employed4 MW_Ch_InTwo_Yrs_X_RoutineSh3_* MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* MW_Ch_3Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RS0_3yr2

** Include Hike in 2Yrs, in 3Yrs & 3Yrs Ago**
reg ln_change_occ_employed4 MW_Ch_InThree_Yrs_1 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_3Yrs_Ago_1 MW_Ch_InThree_Yrs_2 MW_Ch_InTwo_Yrs_2 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_3Yrs_Ago_2 MW_Ch_InThree_Yrs_3 MW_Ch_InTwo_Yrs_3 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_3Yrs_Ago_3 MW_Ch_InThree_Yrs_4 MW_Ch_InTwo_Yrs_4 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 MW_Ch_3Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store all0_3yr2b
reg ln_change_occ_employed4 MW_Ch_InThree_Yrs_X_IntSh_* MW_Ch_InTwo_Yrs_X_IntSh_* MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* MW_Ch_3Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store Int0_3yr2b
reg ln_change_occ_employed4 MW_Ch_InThree_Yrs_X_RoutineSh3_* MW_Ch_InTwo_Yrs_X_RoutineSh3_* MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* MW_Ch_3Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RS0_3yr2b

** Three Year Change in Employment w/ 2-Year Lead Hike **
reg ln_change_occ_employed3 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_InTwo_Yrs_2 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_InTwo_Yrs_3 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_InTwo_Yrs_4 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp3_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp3] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2012, cluster(state)
estimates store all0_3yr6
reg ln_change_occ_employed3 MW_Ch_InTwo_Yrs_X_IntSh_* MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp3_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp3] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2012, cluster(state)
estimates store Int0_3yr6
reg ln_change_occ_employed3 MW_Ch_InTwo_Yrs_X_RoutineSh3_* MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp3_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp3] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2012, cluster(state)
estimates store RS0_3yr6

** Three Year Change in Employment w/ 2-Year and 3-Year Lead Hike **
reg ln_change_occ_employed3 MW_Ch_InThree_Yrs_1 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_InThree_Yrs_2 MW_Ch_InTwo_Yrs_2 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_InThree_Yrs_3 MW_Ch_InTwo_Yrs_3 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_InThree_Yrs_4 MW_Ch_InTwo_Yrs_4 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp3_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp3] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2012, cluster(state)
estimates store all0_3yr6b
reg ln_change_occ_employed3 MW_Ch_InThree_Yrs_X_IntSh_* MW_Ch_InTwo_Yrs_X_IntSh_* MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp3_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp3] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2012, cluster(state)
estimates store Int0_3yr6b
reg ln_change_occ_employed3 MW_Ch_InThree_Yrs_X_RoutineSh3_* MW_Ch_InTwo_Yrs_X_RoutineSh3_* MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp3_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp3] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2012, cluster(state)
estimates store RS0_3yr6b


*************************************************************
** Limit Treatment States to Common Hike Period: Table A8 **
*************************************************************
gen early_adopter=(state=="West Virginia" | state=="Delaware" | state=="Nebraska" | state=="Maine" | state=="New Jersey" | state=="Illinois" | state=="Nevada" | state=="Rhode Island"  | state=="New York")
gen early_adopter2=(state=="West Virginia" | state=="Delaware" | state=="Nebraska" | state=="Maine" | state=="New Jersey" | state=="Illinois" | state=="Nevada" | state=="Rhode Island"  | state=="New York" | state=="California" | state=="Michigan" | state=="Minnesota" | state=="District of Columbia")

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_1  MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum* gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter==0 & year>=2014, cluster(state)
estimates store RCS_a1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_1  MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum* gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter2==0 & year>=2014, cluster(state)
estimates store RCS_a2

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_1  MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1 MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh2_3 MW_Ch_This_Yr_X_RoutineSh2_3 MW_Ch_Last_Yr_X_RoutineSh2_3 MW_Ch_2Yrs_Ago_X_RoutineSh2_3 MW_Ch_Next_Yr_X_RoutineSh2_4 MW_Ch_This_Yr_X_RoutineSh2_4 MW_Ch_Last_Yr_X_RoutineSh2_4 MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum* gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter==0 & year>=2014, cluster(state)
estimates store RMS_a1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_1  MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1 MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh2_3 MW_Ch_This_Yr_X_RoutineSh2_3 MW_Ch_Last_Yr_X_RoutineSh2_3 MW_Ch_2Yrs_Ago_X_RoutineSh2_3 MW_Ch_Next_Yr_X_RoutineSh2_4 MW_Ch_This_Yr_X_RoutineSh2_4 MW_Ch_Last_Yr_X_RoutineSh2_4 MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum* gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter2==0 & year>=2014, cluster(state)
estimates store RMS_a2

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_1  MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_RoutineSh3_3 MW_Ch_This_Yr_X_RoutineSh3_3 MW_Ch_Last_Yr_X_RoutineSh3_3 MW_Ch_2Yrs_Ago_X_RoutineSh3_3 MW_Ch_Next_Yr_X_RoutineSh3_4 MW_Ch_This_Yr_X_RoutineSh3_4 MW_Ch_Last_Yr_X_RoutineSh3_4 MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum* gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter==0 & year>=2014, cluster(state)
estimates store RS_a1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_1  MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_RoutineSh3_3 MW_Ch_This_Yr_X_RoutineSh3_3 MW_Ch_Last_Yr_X_RoutineSh3_3 MW_Ch_2Yrs_Ago_X_RoutineSh3_3 MW_Ch_Next_Yr_X_RoutineSh3_4 MW_Ch_This_Yr_X_RoutineSh3_4 MW_Ch_Last_Yr_X_RoutineSh3_4 MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum* gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter2==0 & year>=2014, cluster(state)
estimates store RS_a2

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2 MW_Ch_Next_Yr_X_IntSh_3 MW_Ch_This_Yr_X_IntSh_3 MW_Ch_Last_Yr_X_IntSh_3 MW_Ch_2Yrs_Ago_X_IntSh_3 MW_Ch_Next_Yr_X_IntSh_4 MW_Ch_This_Yr_X_IntSh_4 MW_Ch_Last_Yr_X_IntSh_4 MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum* gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter==0 & year>=2014, cluster(state)
estimates store Int_a1
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2 MW_Ch_Next_Yr_X_IntSh_3 MW_Ch_This_Yr_X_IntSh_3 MW_Ch_Last_Yr_X_IntSh_3 MW_Ch_2Yrs_Ago_X_IntSh_3 MW_Ch_Next_Yr_X_IntSh_4 MW_Ch_This_Yr_X_IntSh_4 MW_Ch_Last_Yr_X_IntSh_4 MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum* gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & early_adopter2==0 & year>=2014, cluster(state)
estimates store Int_a2

***********************************************
** Non-linear EFfects of MW Hikes: Table A9 **
***********************************************
gen LMW_Ch_Next_Yr=(MW_Ch_Next_Yr>0 & MW_Ch_Next_Yr<0.07)
gen LMW_Ch_This_Yr=(MW_Ch_This_Yr>0 & MW_Ch_This_Yr<0.07)
gen LMW_Ch_Last_Yr=(MW_Ch_Last_Yr>0 & MW_Ch_Last_Yr<0.07)
gen LMW_Ch_2Yrs_Ago=(MW_Ch_2Yrs_Ago>0 & MW_Ch_2Yrs_Ago<0.07)

gen HMW_Ch_Next_Yr=(MW_Ch_Next_Yr>=0.07 & MW_Ch_Next_Yr~=.)
gen HMW_Ch_This_Yr=(MW_Ch_This_Yr>=0.07 & MW_Ch_This_Yr~=.)
gen HMW_Ch_Last_Yr=(MW_Ch_Last_Yr>=0.07 & MW_Ch_Last_Yr~=.)
gen HMW_Ch_2Yrs_Ago=(MW_Ch_2Yrs_Ago>=0.07 & MW_Ch_2Yrs_Ago~=.)

forvalues g=1/4{
foreach task_var in "RoutineSh" "RoutineSh2" "RoutineSh3" "IntSh" {
gen MWSq_Ch_Next_Yr_X_`task_var'_`g'=(((MW_Ch_Next_Yr)^2)*100)*group_dum`g'*`task_var'
gen MWSq_Ch_This_Yr_X_`task_var'_`g'=(((MW_Ch_This_Yr)^2)*100)*`task_var'*group_dum`g'
gen MWSq_Ch_Last_Yr_X_`task_var'_`g'=(((MW_Ch_Last_Yr)^2)*100)*`task_var'*group_dum`g'
gen MWSq_Ch_2Yrs_Ago_X_`task_var'_`g'=(((MW_Ch_2Yrs_Ago)^2)*100)*`task_var'*group_dum`g'

gen LMW_Ch_Next_Yr_X_`task_var'_`g'=LMW_Ch_Next_Yr*group_dum`g'*`task_var'
gen LMW_Ch_This_Yr_X_`task_var'_`g'=LMW_Ch_This_Yr*`task_var'*group_dum`g'
gen LMW_Ch_Last_Yr_X_`task_var'_`g'=LMW_Ch_Last_Yr*`task_var'*group_dum`g'
gen LMW_Ch_2Yrs_Ago_X_`task_var'_`g'=LMW_Ch_2Yrs_Ago*`task_var'*group_dum`g'

gen HMW_Ch_Next_Yr_X_`task_var'_`g'=HMW_Ch_Next_Yr*group_dum`g'*`task_var'
gen HMW_Ch_This_Yr_X_`task_var'_`g'=HMW_Ch_This_Yr*`task_var'*group_dum`g'
gen HMW_Ch_Last_Yr_X_`task_var'_`g'=HMW_Ch_Last_Yr*`task_var'*group_dum`g'
gen HMW_Ch_2Yrs_Ago_X_`task_var'_`g'=HMW_Ch_2Yrs_Ago*`task_var'*group_dum`g'
}
}

reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* MWSq_Ch_Next_Yr_X_RoutineSh_* MWSq_Ch_This_Yr_X_RoutineSh_* MWSq_Ch_Last_Yr_X_RoutineSh_* MWSq_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RCS4a
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* MWSq_Ch_Next_Yr_X_RoutineSh2_* MWSq_Ch_This_Yr_X_RoutineSh2_* MWSq_Ch_Last_Yr_X_RoutineSh2_* MWSq_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RMS4a
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* MWSq_Ch_Next_Yr_X_IntSh_* MWSq_Ch_This_Yr_X_IntSh_* MWSq_Ch_Last_Yr_X_IntSh_* MWSq_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store Int4a
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* MWSq_Ch_Next_Yr_X_RoutineSh3_* MWSq_Ch_This_Yr_X_RoutineSh3_* MWSq_Ch_Last_Yr_X_RoutineSh3_* MWSq_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RS4a

reg ln_change_occ_employed4 LMW_Ch_Next_Yr_X_RoutineSh_* LMW_Ch_This_Yr_X_RoutineSh_* LMW_Ch_Last_Yr_X_RoutineSh_* LMW_Ch_2Yrs_Ago_X_RoutineSh_* HMW_Ch_Next_Yr_X_RoutineSh_* HMW_Ch_This_Yr_X_RoutineSh_* HMW_Ch_Last_Yr_X_RoutineSh_* HMW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RCS4b
reg ln_change_occ_employed4 LMW_Ch_Next_Yr_X_RoutineSh2_* LMW_Ch_This_Yr_X_RoutineSh2_* LMW_Ch_Last_Yr_X_RoutineSh2_* LMW_Ch_2Yrs_Ago_X_RoutineSh2_* HMW_Ch_Next_Yr_X_RoutineSh2_* HMW_Ch_This_Yr_X_RoutineSh2_* HMW_Ch_Last_Yr_X_RoutineSh2_* HMW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RMS4b
reg ln_change_occ_employed4 LMW_Ch_Next_Yr_X_IntSh_* LMW_Ch_This_Yr_X_IntSh_* LMW_Ch_Last_Yr_X_IntSh_* LMW_Ch_2Yrs_Ago_X_IntSh_* HMW_Ch_Next_Yr_X_IntSh_* HMW_Ch_This_Yr_X_IntSh_* HMW_Ch_Last_Yr_X_IntSh_* HMW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store Int4b
reg ln_change_occ_employed4 LMW_Ch_Next_Yr_X_RoutineSh3_* LMW_Ch_This_Yr_X_RoutineSh3_* LMW_Ch_Last_Yr_X_RoutineSh3_* LMW_Ch_2Yrs_Ago_X_RoutineSh3_* HMW_Ch_Next_Yr_X_RoutineSh3_* HMW_Ch_This_Yr_X_RoutineSh3_* HMW_Ch_Last_Yr_X_RoutineSh3_* HMW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RS4b

************************************************
** Exclude Employment-Based Weights: Table B1 **
************************************************

** Unweighted, All Observations**
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store all0_un
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RCS0_un
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RMS0_un
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum*  if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store Int0_un
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013, cluster(state)
estimates store RS0_un

** Unweighted, Exclude Large Employment Changes**
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & ln_change_occ_employed4>-1 & ln_change_occ_employed4<1, cluster(state)
estimates store all0_un2
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & ln_change_occ_employed4>-1 & ln_change_occ_employed4<1, cluster(state)
estimates store RCS0_un2
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & ln_change_occ_employed4>-1 & ln_change_occ_employed4<1, cluster(state)
estimates store RMS0_un2
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum*  if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & ln_change_occ_employed4>-1 & ln_change_occ_employed4<1, cluster(state)
estimates store Int0_un2
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & ln_change_occ_employed4>-1 & ln_change_occ_employed4<1, cluster(state)
estimates store RS0_un2

** Unweighted, Large Occupations**
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4>10000, cluster(state)
estimates store all0_un3
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4>10000, cluster(state)
estimates store RCS0_un3
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4>10000, cluster(state)
estimates store RMS0_un3
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum*  if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4>10000, cluster(state)
estimates store Int0_un3
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4>10000, cluster(state)
estimates store RS0_un3

** Unweighted, Smaller Occupations**
reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4<=10000, cluster(state)
estimates store all0_un4
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh_* MW_Ch_This_Yr_X_RoutineSh_* MW_Ch_Last_Yr_X_RoutineSh_* MW_Ch_2Yrs_Ago_X_RoutineSh_* lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4<=10000, cluster(state)
estimates store RCS0_un4
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh2_* MW_Ch_This_Yr_X_RoutineSh2_* MW_Ch_Last_Yr_X_RoutineSh2_* MW_Ch_2Yrs_Ago_X_RoutineSh2_* lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4<=10000, cluster(state)
estimates store RMS0_un4
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_IntSh_* MW_Ch_This_Yr_X_IntSh_* MW_Ch_Last_Yr_X_IntSh_* MW_Ch_2Yrs_Ago_X_IntSh_* lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum*  if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4<=10000, cluster(state)
estimates store Int0_un4
reg ln_change_occ_employed4 MW_Ch_Next_Yr_X_RoutineSh3_* MW_Ch_This_Yr_X_RoutineSh3_* MW_Ch_Last_Yr_X_RoutineSh3_* MW_Ch_2Yrs_Ago_X_RoutineSh3_* lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>2013 & orig_emp4<=10000, cluster(state)
estimates store RS0_un4

*******************************
****** Make Figure 1 **********
*******************************
clear
use `path'\FormattedData\OES_Analysis_Data

keep if year>=2010
keep onetsoccode description state year tot_emp ave_hourly_wage mw lmw l2mw l3mw ave2_state_w2mw group share_r_cog share_r_man share_nr_cog_a share_nr_cog_p share_nr_man_ph share_nr_man_pers share_r share_int

egen tot_emp_all=sum(tot_emp), by(onetsoccode)
gen sh_te=tot_emp/tot_emp_all
gen t_sh_group=sh_te*group
egen sh_group=sum(t_sh_group), by(onetsoccode)
gen low_wage_occ=(sh_group<2)

gen lw_int_occ=(low_wage_occ==1 & share_int>=0.5)
gen lw_r_occ=(low_wage_occ==1 & share_r>=0.5)

keep if low_wage_occ==1
gen oth_occ=(lw_int_occ==0 & lw_r_occ==0)

gen occ_type=1 if lw_r_occ==1
replace occ_type=3 if lw_int_occ==1
replace occ_type=2 if oth_occ==1

gen mw_NoCh_st=(state=="Alabama" | state=="Georgia" | state=="Idaho" | state=="Indiana" | state=="Iowa" | state=="Kansas" | state=="Kentucky" | state=="Louisiana" | state=="Mississippi" | state=="New Hampshire" | state=="North Carolina"  | state=="North Dakota" | state=="Oklahoma" | state=="Pennsylvania" | state=="South Carolina" | state=="Tennessee" | state=="Texas" | state=="Utah" | state=="Virginia" | state=="Wisconsin" | state=="Wyoming" | state=="New Mexico") 

egen tot_emp_yr2=sum(tot_emp), by(occ_type year)
egen tot_emp_yr3=sum(tot_emp), by(occ_type mw_NoCh_st year)
egen tot_emp_yr4=sum(tot_emp), by(mw_NoCh_st year)

gen t_tot_emp_yr2_10=tot_emp_yr2 if year==2010
egen tot_emp_yr2_10=mode(t_tot_emp_yr2_10), by(occ_type)
gen tot_emp_yr2_rat=(tot_emp_yr2/tot_emp_yr2_10)*100

gen t_tot_emp_yr3_10=tot_emp_yr3 if year==2010
egen tot_emp_yr3_10=mode(t_tot_emp_yr3_10), by(occ_type mw_NoCh_st)
gen tot_emp_yr3_rat=(tot_emp_yr3/tot_emp_yr3_10)*100

gen delta_mw=mw-lmw
replace delta_mw=0 if year==2010
replace delta_mw=. if mw_NoCh_st==1

gen sh1=tot_emp/tot_emp_yr4
gen t_ave_delta_mw=delta_mw*sh1
egen ave_delta_mw=sum(t_ave_delta_mw), by(year)

sort occ_type mw_NoCh_st year
twoway (line tot_emp_yr3_rat year if occ_type==1 & mw_NoCh_st==1, lwidth(1.0) yaxis(1)) (line  tot_emp_yr3_rat year if occ_type==1 & mw_NoCh_st==0, lwidth(1.0) yaxis(1)) (spike ave_delta_mw year, yaxis(2) lwidth(1.0)), legend(order(1 "No Hike States" 2 "Minimum Wage Hike States" 3 "Average Hike") cols(3))  xtitle(Year) ytitle(Relative Employment, axis(1)) ytitle(Average Minimum Wage Hike, axis(2))  title("Routine Occupations") saving(`path'\Figures\temp\Fig1A, replace)
twoway (line tot_emp_yr3_rat year if occ_type==3 & mw_NoCh_st==1, lwidth(1.0) yaxis(1)) (line  tot_emp_yr3_rat year if occ_type==3 & mw_NoCh_st==0, lwidth(1.0) yaxis(1)) (spike ave_delta_mw year, yaxis(2) lwidth(1.0)), legend(order(1 "No Hike States" 2 "Minimum Wage Hike States" 3 "Average Hike") cols(3))  xtitle(Year) ytitle(Relative Employment, axis(1)) ytitle(Average Minimum Wage Hike, axis(2))  title("Interpersonal Occupations") saving(`path'\Figures\temp\Fig1B, replace)
twoway (line tot_emp_yr3_rat year if occ_type==2 & mw_NoCh_st==1, lwidth(1.0) yaxis(1)) (line  tot_emp_yr3_rat year if occ_type==2 & mw_NoCh_st==0, lwidth(1.0) yaxis(1)) (spike ave_delta_mw year, yaxis(2) lwidth(1.0)), legend(order(1 "No Hike States" 2 "Minimum Wage Hike States" 3 "Average Hike") cols(3))  xtitle(Year) ytitle(Relative Employment, axis(1)) ytitle(Average Minimum Wage Hike, axis(2))  title("Other Occupations") saving(`path'\Figures\temp\Fig1C, replace)

grc1leg "`path'\Figures\temp\Fig1A" "`path'\Figures\temp\Fig1B" "`path'\Figures\temp\Fig1C", col(3) title("Figure 1: Employment in Low-Wage Routine and Interpersonal Occupations" "Minimum Wage Hike States vs. No Hike States", size(large)) note("Note: Routine (Interpersonal) occupations are occupations with routine (interpersonal) task shares greater" "than 50 percent.  The average minimum wage hike is a employment-based weighted average for those" "states that increased their minimum wage.  20 states increased their minimum wage, separate from automatic" "inflation-based adjustments, between 2010 and 2018.  We exclude nine states with automatic annual" "inflation-based adjustments. Employment data from OEWS, 2010-2018.") saving(`path'\Figures\Figure1, replace)


********************************************************
********** Make Figure 2 & Appendix Table A3 ***********
********************************************************
clear
use `path'\FormattedData\OES_Analysis_Data

reg ln_change_occ_employed4 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 lgr_orig_emp4_* group_dum*  state_dum* year_dum* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year<2010, cluster(state)
estimates store all1b

gen NextYr=MW_Ch_Next_Yr_X_RoutineSh_1  
gen ThisYr=MW_Ch_This_Yr_X_RoutineSh_1 
gen LastYr=MW_Ch_Last_Yr_X_RoutineSh_1 
gen TwoYrsAgo=MW_Ch_2Yrs_Ago_X_RoutineSh_1
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RCS1a
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year<2010, cluster(state)
estimates store RCS1b
drop NextYr ThisYr LastYr TwoYrsAgo

gen NextYr=MW_Ch_Next_Yr_X_RoutineSh2_1  
gen ThisYr=MW_Ch_This_Yr_X_RoutineSh2_1 
gen LastYr=MW_Ch_Last_Yr_X_RoutineSh2_1 
gen TwoYrsAgo=MW_Ch_2Yrs_Ago_X_RoutineSh2_1
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh2_3 MW_Ch_This_Yr_X_RoutineSh2_3 MW_Ch_Last_Yr_X_RoutineSh2_3 MW_Ch_2Yrs_Ago_X_RoutineSh2_3 MW_Ch_Next_Yr_X_RoutineSh2_4 MW_Ch_This_Yr_X_RoutineSh2_4 MW_Ch_Last_Yr_X_RoutineSh2_4 MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RMS1a
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh2_3 MW_Ch_This_Yr_X_RoutineSh2_3 MW_Ch_Last_Yr_X_RoutineSh2_3 MW_Ch_2Yrs_Ago_X_RoutineSh2_3 MW_Ch_Next_Yr_X_RoutineSh2_4 MW_Ch_This_Yr_X_RoutineSh2_4 MW_Ch_Last_Yr_X_RoutineSh2_4 MW_Ch_2Yrs_Ago_X_RoutineSh2_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh2_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year<2010, cluster(state)
estimates store RMS1b
drop NextYr ThisYr LastYr TwoYrsAgo

gen NextYr=MW_Ch_Next_Yr_X_RoutineSh3_1  
gen ThisYr=MW_Ch_This_Yr_X_RoutineSh3_1 
gen LastYr=MW_Ch_Last_Yr_X_RoutineSh3_1 
gen TwoYrsAgo=MW_Ch_2Yrs_Ago_X_RoutineSh3_1
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_RoutineSh3_3 MW_Ch_This_Yr_X_RoutineSh3_3 MW_Ch_Last_Yr_X_RoutineSh3_3 MW_Ch_2Yrs_Ago_X_RoutineSh3_3 MW_Ch_Next_Yr_X_RoutineSh3_4 MW_Ch_This_Yr_X_RoutineSh3_4 MW_Ch_Last_Yr_X_RoutineSh3_4 MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store RS1a
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_RoutineSh3_3 MW_Ch_This_Yr_X_RoutineSh3_3 MW_Ch_Last_Yr_X_RoutineSh3_3 MW_Ch_2Yrs_Ago_X_RoutineSh3_3 MW_Ch_Next_Yr_X_RoutineSh3_4 MW_Ch_This_Yr_X_RoutineSh3_4 MW_Ch_Last_Yr_X_RoutineSh3_4 MW_Ch_2Yrs_Ago_X_RoutineSh3_4 lgr_orig_emp4_* group_dum*  gr_RoutineSh3_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year<2010, cluster(state)
estimates store RS1b
drop NextYr ThisYr LastYr TwoYrsAgo

gen NextYr=MW_Ch_Next_Yr_X_IntSh_1  
gen ThisYr=MW_Ch_This_Yr_X_IntSh_1 
gen LastYr=MW_Ch_Last_Yr_X_IntSh_1 
gen TwoYrsAgo=MW_Ch_2Yrs_Ago_X_IntSh_1
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2 MW_Ch_Next_Yr_X_IntSh_3 MW_Ch_This_Yr_X_IntSh_3 MW_Ch_Last_Yr_X_IntSh_3 MW_Ch_2Yrs_Ago_X_IntSh_3 MW_Ch_Next_Yr_X_IntSh_4 MW_Ch_This_Yr_X_IntSh_4 MW_Ch_Last_Yr_X_IntSh_4 MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year>=2014, cluster(state)
estimates store Int1a
reg ln_change_occ_employed4 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2 MW_Ch_Next_Yr_X_IntSh_3 MW_Ch_This_Yr_X_IntSh_3 MW_Ch_Last_Yr_X_IntSh_3 MW_Ch_2Yrs_Ago_X_IntSh_3 MW_Ch_Next_Yr_X_IntSh_4 MW_Ch_This_Yr_X_IntSh_4 MW_Ch_Last_Yr_X_IntSh_4 MW_Ch_2Yrs_Ago_X_IntSh_4 lgr_orig_emp4_* group_dum*  gr_IntSh_* state_yr* occ_dum* [pweight=orig_emp4] if  ave2_state_w2mw>=1 & ave2_state_w2mw<6 & soi==1 & year<2010, cluster(state)
estimates store Int1b
drop NextYr ThisYr LastYr TwoYrsAgo

coefplot (RCS1a, label(2010-2018) offset(0.0)) (RCS1b, label(1999-2009) offset(-0.04)), keep(NextYr ThisYr LastYr TwoYrsAgo) vertical yline(0) recast(connected) title("Routine Cognitive Tasks", color(black)) xtitle(Years Relative to Minimum Wage Hike) ytitle("Elasticitiy") saving(`path'\Figures\temp\Fig2A, replace)
coefplot (RMS1a, label(2010-2018) offset(0.0)) (RMS1b, label(1999-2009) offset(-0.04)), keep(NextYr ThisYr LastYr TwoYrsAgo) vertical yline(0) recast(connected) title("Routine Manual Tasks", color(black)) xtitle(Years Relative to Minimum Wage Hike) ytitle("Elasticitiy") saving(`path'\Figures\temp\Fig2B, replace)
coefplot (RS1a, label(2010-2018) offset(0.0)) (RS1b, label(1999-2009) offset(-0.04)), keep(NextYr ThisYr LastYr TwoYrsAgo) vertical yline(0) recast(connected) title("All Routine Tasks", color(black)) xtitle(Years Relative to Minimum Wage Hike) ytitle("Elasticitiy") saving(`path'\Figures\temp\Fig2C, replace)
coefplot (Int1a, label(2010-2018) offset(0.0)) (Int1b, label(1999-2009) offset(-0.04)), keep(NextYr ThisYr LastYr TwoYrsAgo) vertical yline(0) recast(connected) title("Interpersonal Tasks", size(medlarge) color(black)) xtitle(Years Relative to Minimum Wage Hike) ytitle("Elasticitiy") saving(`path'\Figures\temp\Fig2D, replace)

grc1leg "`path'\Figures\temp\Fig2A.gph" "`path'\Figures\temp\Fig2B.gph" "`path'\Figures\temp\Fig2C.gph"  "`path'\Figures\temp\Fig2D.gph", col(2)  iscale(0.5) title("Figure 2: Effect of Minimum Wage Hikes by Task Intensity" "1999-2009 vs. 2010-2018") note("Note: This figure presents the estimated elasticity prior to and following a minimum wage hike for Wage" "Group 1 occupations using 1999-2009 and 2010-2018 OEWS data.  The standard error bars capture the 95%" "confidence interval for each estimated elasticity.") saving(`path'\Figures\Figure2, replace)

************************************
********** Make Figure A1 **********
************************************
clear
use `path'\FormattedData\OES_Analysis_Data

keep if year>=2010
keep onetsoccode description state year tot_emp ave_hourly_wage mw lmw l2mw l3mw ave2_state_w2mw group share_r_cog share_r_man share_nr_cog_a share_nr_cog_p share_nr_man_ph share_nr_man_pers share_r share_int

egen tot_emp_all=sum(tot_emp), by(onetsoccode)
gen sh_te=tot_emp/tot_emp_all
gen t_sh_group=sh_te*group
egen sh_group=sum(t_sh_group), by(onetsoccode)
gen low_wage_occ=(sh_group<2)

gen lw_int_occ=(low_wage_occ==1 & share_int>=0.5)
gen lw_r_occ=(low_wage_occ==1 & share_r>=0.5)

keep if low_wage_occ==1
gen oth_occ=(lw_int_occ==0 & lw_r_occ==0)

gen occ_type=1 if lw_r_occ==1
replace occ_type=3 if lw_int_occ==1
replace occ_type=2 if oth_occ==1

gen mw_NoCh_st=(state=="Alabama" | state=="Georgia" | state=="Idaho" | state=="Indiana" | state=="Iowa" | state=="Kansas" | state=="Kentucky" | state=="Louisiana" | state=="Mississippi" | state=="New Hampshire" | state=="North Carolina"  | state=="North Dakota" | state=="Oklahoma" | state=="Pennsylvania" | state=="South Carolina" | state=="Tennessee" | state=="Texas" | state=="Utah" | state=="Virginia" | state=="Wisconsin" | state=="Wyoming" | state=="New Mexico") 

drop if state=="West Virginia" | state=="Delaware" | state=="Nebraska" | state=="Maine" | state=="New Jersey" | state=="Illinois" | state=="Nevada" | state=="Rhode Island" | state=="New York" | state=="California" | state=="Michigan" | state=="Minnesota" | state=="District of Columbia" | state=="Connecticut"

egen tot_emp_yr3=sum(tot_emp), by(occ_type mw_NoCh_st year)
egen tot_emp_yr4=sum(tot_emp), by(mw_NoCh_st year)

gen t_tot_emp_yr3_10=tot_emp_yr3 if year==2010
egen tot_emp_yr3_10=mode(t_tot_emp_yr3_10), by(occ_type mw_NoCh_st)
gen tot_emp_yr3_rat=(tot_emp_yr3/tot_emp_yr3_10)*100

gen delta_mw=mw-lmw
replace delta_mw=0 if year==2010
replace delta_mw=. if mw_NoCh_st==1

gen sh1=tot_emp/tot_emp_yr4
gen t_ave_delta_mw=delta_mw*sh1
egen ave_delta_mw=sum(t_ave_delta_mw), by(year)

sort occ_type mw_NoCh_st year

twoway (line tot_emp_yr3_rat year if occ_type==1 & mw_NoCh_st==1, lwidth(1.0) yaxis(1)) (line  tot_emp_yr3_rat year if occ_type==1 & mw_NoCh_st==0, lwidth(1.0) yaxis(1)) (spike ave_delta_mw year, yaxis(2) lwidth(1.0)), legend(order(1 "No Hike States" 2 "Minimum Wage Hike States" 3 "Average Hike") cols(3))  xtitle(Year) ytitle(Relative Employment, axis(1)) ytitle(Average Minimum Wage Hike, axis(2))  title("Routine Tasks") saving(`path'\Figures\temp\AppFig1a, replace)
twoway (line tot_emp_yr3_rat year if occ_type==3 & mw_NoCh_st==1, lwidth(1.0) yaxis(1)) (line  tot_emp_yr3_rat year if occ_type==3 & mw_NoCh_st==0, lwidth(1.0) yaxis(1)) (spike ave_delta_mw year, yaxis(2) lwidth(1.0)), legend(order(1 "No Hike States" 2 "Minimum Wage Hike States" 3 "Average Hike") cols(3))  xtitle(Year) ytitle(Relative Employment, axis(1)) ytitle(Average Minimum Wage Hike, axis(2))  title("Interpersonal Tasks") saving(`path'\Figures\temp\AppFig1b, replace)

grc1leg "`path'\Figures\temp\AppFig1a" "`path'\Figures\temp\AppFig1b", title("Figure A1: Employment in Low-Wage Routine and Interpersonal Occupations" "Limited Minimum Wage Hike States", size(large)) note("Note: This figure is limited to occupations where tasks intensity is more than 50 percent of the total tasks (either" "routine or interpersonal).  The minimum wage hike states are limited to those states that did not increase their min-" "imum wage until 2015 and then increased it every year 2015-2017 (some also increased in 2018).  We further exclude" "California because several localities in CA had increased their minimum wages prior to 2015.  The average" "minimum wage hike is a employment-based weighted average for those states.") saving(`path'\Figures\FigureA1, replace)

*************************************
********** Make Figure A2 ***********
*************************************
clear
use `path'\FormattedData\OES_Analysis_Data
collapse (mean) mw, by(year)
merge 1:1 year using `path'\RawData\tech_cpi
keep if _merge==3
keep if year>=1999 & year<2019
twoway (line comp_ppi year, lwidth(1) yaxis(1) legend(cols(3) label(1 "Electronic Computer PPI") label(2 "Point of Sale Terminal PPI") label(3 "Ave. Minimum Wage")) title("Figure A2: Information Technology Prices and Average Minimum Wages" "1999-2018") ytitle("Information Technology Prices") xtitle("Year") saving(`path'\Figures\FigureA2, replace)) (line pos_ppi year, lwidth(1) yaxis(1)) (line mw year, lwidth(1) yaxis(2) ytitle("Average Minimum Wage Levels", axis(2)) note("Notes: The Electronic Computer PPI (WPU1151) and Point of Sale Terminal PPI (WPU115406)" "are commodity-based price indices and were collected from the Federal Reserve Bank of St. Louis" "FRED database.  The average minimum wage is the weighted average state-level minimum wage" "as of May of each year, which corresponds to the OEWS data.")) 



*******************************************
****** Summary Stats for Table 1 **********
*******************************************

clear
use `path'\FormattedData\temp\OES_data_2010_2018.dta

***Merge in Task Data and Create Task Share Variables***
merge m:1 onetsoccode using `path'\RawData\AcemogluAutorTaskData
keep if _merge==3
drop _merge

drop if nr_cog_anal==. | nr_cog_pers==. | r_cog==. | r_man==. | nr_man_phys==. | nr_man_pers==. 
foreach task_var in "nr_cog_anal" "nr_cog_pers" "r_cog" "r_man" "nr_man_phys" "nr_man_pers" {
egen min_`task_var'=min(`task_var')
gen  `task_var'_renorm= `task_var'-min_`task_var'
}

egen total_task_intensivity=rsum(nr_cog_anal_renorm nr_cog_pers_renorm r_cog_renorm r_man_renorm nr_man_phys_renorm nr_man_pers_renorm)
gen share_r=(r_cog_renorm+r_man_renorm)/total_task_intensivity
gen share_int=(nr_man_pers_renorm+nr_cog_pers_renorm)/total_task_intensivity

***Merge in MW Data**
merge m:1 state year using `path'\FormattedData\May_MW_Data_AllYr
keep if _merge==3
drop _merge

** Limit Sample to Occupations With Average Wage-to-Minimum Wage Less than 1.5 in at least one state **
gen ave_w2mw=ave_hourly_wage/mw
egen tot_occ_emp=sum(tot_emp), by(onetsoccode state)
gen w_share=tot_emp/tot_occ_emp
gen part_ave_w2mw=ave_w2mw*w_share
egen ave_state_w2mw=sum(part_ave_w2mw), by(onetsoccode state)
drop tot_occ_emp

gen group=0
replace group=1 if  ave_state_w2mw>=1 & ave_state_w2mw<1.5
replace group=2 if  ave_state_w2mw>=1.5 & ave_state_w2mw<2
replace group=3 if  ave_state_w2mw>=2 & ave_state_w2mw<2.5
replace group=4 if  ave_state_w2mw>=2.5 & ave_state_w2mw<6
drop if group==0

egen tot_emp_all=sum(tot_emp), by(onetsoccode)
gen sh_te=tot_emp/tot_emp_all
gen t_sh_group=sh_te*group
egen sh_group=sum(t_sh_group), by(onetsoccode)
keep if sh_group<2
gen t_sh_w2mw=sh_te*ave_w2mw
egen new_w2mw=sum(t_sh_w2mw), by(onetsoccode)
egen tot_emp_all2=sum(tot_emp), by(onetsoccode year)


collapse (mean) tot_emp_all2 new_w2mw share_r share_int, by(onetsoccode description year)
keep if year==2010 | year==2018
gen t_tot_emp_2018=tot_emp_all2 if year==2018
egen tot_emp_2018=mode(t_tot_emp_2018), by(onetsoccode description)
keep if year==2010
gen emp_growth=((tot_emp_2018-tot_emp_all2)/tot_emp_all2)*100

****** Info for Table 1 ****
keep description new_w2mw share_r share_int tot_emp_all2 emp_growth
gsort -share_r
save `path'\FormattedData\high_routine_occs, replace
gsort -share_int
save `path'\FormattedData\high_int_occs, replace


**************************************
** Table A1: Minimum Wages by State **
**************************************
clear
use `path'\RawData\monthly_mw_data
keep if month== 5 
rename statename state
rename mean_mw mw
drop statefips stateabb month date

sort state year
keep if year>=2010 & year<=2019
gen mw2=mw
replace mw2=. if mw==mw[_n-1] & state==state[_n-1]

gen mw_NoCh_st=(state=="Alabama" | state=="Georgia" | state=="Idaho" | state=="Indiana" | state=="Iowa" | state=="Kansas" | state=="Kentucky" | state=="Louisiana" | state=="Mississippi" | state=="New Hampshire" | state=="North Carolina"  | state=="North Dakota" | state=="Oklahoma" | state=="Pennsylvania" | state=="South Carolina" | state=="Tennessee" | state=="Texas" | state=="Utah" | state=="Virginia" | state=="Wisconsin" | state=="Wyoming" | state=="New Mexico") 
drop if mw_NoCh_st==1
drop mw
rename mw2 mw

tab state, gen(state_dum)
gen state2=.
forvalues k=1/29{
replace state2=`k' if state_dum`k'==1
}

drop state_dum* state
reshape wide mw, i(year) j(state2)
rename (mw1 mw2 mw3 mw4 mw5 mw6 mw7 mw8 mw9 mw10 mw11 mw12 mw13 mw14 mw15 mw16 mw17 mw18 mw19 mw20 mw21 mw22 mw23 mw24 mw25 mw26 mw27 mw28 mw29) (Alaska Arizona Arkansas California Colorado Connecticut Delaware DistrictOfColumbia Florida Hawaii Illinois Maine Maryland Massachusetts Michigan Minnesota Missouri Montana Nebraska Nevada NewJersey NewYork Ohio Oregon RhodeIsland SouthDakota Vermont Washington WestVirginia)


*****************************************************************
******************* Tables of Results ***************************
*****************************************************************

********************
** Results - Stars**
********************
** Table 2 **
estimates table all0 RCS01 RCS0, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects)
** Table 3 **
estimates table RCS0 RMS0 RS0 Int0 NRCA0 NRMP0, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh2_1 MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1 MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2 MW_Ch_Next_Yr_X_NRCogASh_1 MW_Ch_This_Yr_X_NRCogASh_1 MW_Ch_Last_Yr_X_NRCogASh_1 MW_Ch_2Yrs_Ago_X_NRCogASh_1 MW_Ch_Next_Yr_X_NRCogASh_2 MW_Ch_This_Yr_X_NRCogASh_2 MW_Ch_Last_Yr_X_NRCogASh_2 MW_Ch_2Yrs_Ago_X_NRCogASh_2 MW_Ch_Next_Yr_X_NRManPhysSh_1 MW_Ch_This_Yr_X_NRManPhysSh_1 MW_Ch_Last_Yr_X_NRManPhysSh_1 MW_Ch_2Yrs_Ago_X_NRManPhysSh_1 MW_Ch_Next_Yr_X_NRManPhysSh_2 MW_Ch_This_Yr_X_NRManPhysSh_2 MW_Ch_Last_Yr_X_NRManPhysSh_2 MW_Ch_2Yrs_Ago_X_NRManPhysSh_2) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects with third Lag)
** Table 4 **
estimates table RCS1 RCS2 RCS3 RCS4 RCS5,  b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_RoutineSh_1 tt_MW_Ch_2Yrs_Ago_X_RoutineSh_1 m0_MW_Ch_2Yrs_Ago_X_RoutineSh_1 c_MW_Ch_2Yrs_Ago_X_RoutineSh_1 p_MW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects)
estimates table RMS1 RMS2 RMS3 RMS4 RMS5, b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_RoutineSh2_1 tt_MW_Ch_2Yrs_Ago_X_RoutineSh2_1 m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_1 c_MW_Ch_2Yrs_Ago_X_RoutineSh2_1 p_MW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects)
estimates table RS1 RS2 RS3 RS4 RS5, b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_RoutineSh3_1 tt_MW_Ch_2Yrs_Ago_X_RoutineSh3_1 m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_1 c_MW_Ch_2Yrs_Ago_X_RoutineSh3_1 p_MW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects)
estimates table Int1 Int2 Int3 Int4 Int5, b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_IntSh_1 tt_MW_Ch_2Yrs_Ago_X_IntSh_1 m0_MW_Ch_2Yrs_Ago_X_IntSh_1 c_MW_Ch_2Yrs_Ago_X_IntSh_1 p_MW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects)

** Table A2 **
estimates table RCS0 RMS0 RS0 Int0 NRCA0 NRMP0, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4 MW_Ch_Next_Yr_X_RoutineSh2_3 MW_Ch_This_Yr_X_RoutineSh2_3 MW_Ch_Last_Yr_X_RoutineSh2_3 MW_Ch_2Yrs_Ago_X_RoutineSh2_3 MW_Ch_Next_Yr_X_RoutineSh2_4 MW_Ch_This_Yr_X_RoutineSh2_4 MW_Ch_Last_Yr_X_RoutineSh2_4 MW_Ch_2Yrs_Ago_X_RoutineSh2_4 MW_Ch_Next_Yr_X_RoutineSh3_3 MW_Ch_This_Yr_X_RoutineSh3_3 MW_Ch_Last_Yr_X_RoutineSh3_3 MW_Ch_2Yrs_Ago_X_RoutineSh3_3 MW_Ch_Next_Yr_X_RoutineSh3_4 MW_Ch_This_Yr_X_RoutineSh3_4 MW_Ch_Last_Yr_X_RoutineSh3_4 MW_Ch_2Yrs_Ago_X_RoutineSh3_4 MW_Ch_Next_Yr_X_IntSh_3 MW_Ch_This_Yr_X_IntSh_3 MW_Ch_Last_Yr_X_IntSh_3 MW_Ch_2Yrs_Ago_X_IntSh_3 MW_Ch_Next_Yr_X_IntSh_4 MW_Ch_This_Yr_X_IntSh_4 MW_Ch_Last_Yr_X_IntSh_4 MW_Ch_2Yrs_Ago_X_IntSh_4 MW_Ch_Next_Yr_X_NRCogASh_3 MW_Ch_This_Yr_X_NRCogASh_3 MW_Ch_Last_Yr_X_NRCogASh_3 MW_Ch_2Yrs_Ago_X_NRCogASh_3 MW_Ch_Next_Yr_X_NRCogASh_4 MW_Ch_This_Yr_X_NRCogASh_4 MW_Ch_Last_Yr_X_NRCogASh_4 MW_Ch_2Yrs_Ago_X_NRCogASh_4 MW_Ch_Next_Yr_X_NRManPhysSh_3 MW_Ch_This_Yr_X_NRManPhysSh_3 MW_Ch_Last_Yr_X_NRManPhysSh_3 MW_Ch_2Yrs_Ago_X_NRManPhysSh_3 MW_Ch_Next_Yr_X_NRManPhysSh_4 MW_Ch_This_Yr_X_NRManPhysSh_4 MW_Ch_Last_Yr_X_NRManPhysSh_4 MW_Ch_2Yrs_Ago_X_NRManPhysSh_4) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects with third Lag)

** Table A3 **
estimates table all1b RCS1b RMS1b RS1b Int1b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2) varwidth(30) star(0.1, 0.05, 0.01) title(Effects by Task Content: Earlier Period 1999-2009)

** Table A6 **
estimates table all0 all0_2lead all0_3lead all0_3yr all0_3yr2 all0_3yr2b all0_3yr6 all0_3yr6b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_InThree_Yrs_1 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_3Yrs_Ago_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects with 3 Lags/2 Leads)
estimates table RS0 RS0_2lead RS0_3lead RS0_3yr RS0_3yr2 RS0_3yr2b RS0_3yr6 RS0_3yr6b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_InThree_Yrs_X_RoutineSh3_1 MW_Ch_InTwo_Yrs_X_RoutineSh3_1 MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MW_Ch_3Yrs_Ago_X_RoutineSh3_1) varwidth(30) star(0.1, 0.05, 0.01) title(Effects by Routine Tasks  with 3 Lags/2 Leads)
estimates table Int0 Int0_2lead Int0_3lead Int0_3yr Int0_3yr2 Int0_3yr2b Int0_3yr6 Int0_3yr6b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_InThree_Yrs_X_IntSh_1 MW_Ch_InTwo_Yrs_X_IntSh_1 MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MW_Ch_3Yrs_Ago_X_IntSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Effects by Interpersonal Tasks with 3 Lags/2 Leads)

** Table A8 **
estimates table RCS0 RCS_a1 RCS_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1  MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Use Common Treatment Period: Routine Cognitive Share) 
estimates table RMS0 RMS_a1 RMS_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh2_1  MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) star(0.1, 0.05, 0.01) title(Use Common Treatment Period: Routine Manual Share) 
estimates table RS0 RS_a1 RS_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh3_1  MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) star(0.1, 0.05, 0.01) title(Use Common Treatment Period: Overall Routine Share) 
estimates table Int0 Int_a1 Int_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Use Common Treatment Period: Interpersonal Share) 

** Table A9 **
estimates table RCS0 RCS4a RCS4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MWSq_Ch_Next_Yr_X_RoutineSh_1 MWSq_Ch_This_Yr_X_RoutineSh_1 MWSq_Ch_Last_Yr_X_RoutineSh_1 MWSq_Ch_2Yrs_Ago_X_RoutineSh_1 LMW_Ch_Next_Yr_X_RoutineSh_1 LMW_Ch_This_Yr_X_RoutineSh_1 LMW_Ch_Last_Yr_X_RoutineSh_1 LMW_Ch_2Yrs_Ago_X_RoutineSh_1 HMW_Ch_Next_Yr_X_RoutineSh_1 HMW_Ch_This_Yr_X_RoutineSh_1 HMW_Ch_Last_Yr_X_RoutineSh_1 HMW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Emp Effects, Routine Cognitive Share)
estimates table RMS0 RMS4a RMS4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh2_1 MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1 MWSq_Ch_Next_Yr_X_RoutineSh2_1 MWSq_Ch_This_Yr_X_RoutineSh2_1 MWSq_Ch_Last_Yr_X_RoutineSh2_1 MWSq_Ch_2Yrs_Ago_X_RoutineSh2_1 LMW_Ch_Next_Yr_X_RoutineSh2_1 LMW_Ch_This_Yr_X_RoutineSh2_1 LMW_Ch_Last_Yr_X_RoutineSh2_1 LMW_Ch_2Yrs_Ago_X_RoutineSh2_1 HMW_Ch_Next_Yr_X_RoutineSh2_1 HMW_Ch_This_Yr_X_RoutineSh2_1 HMW_Ch_Last_Yr_X_RoutineSh2_1 HMW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Emp Effects, Routine Cognitive Share)
estimates table RS0 RS4a RS4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MWSq_Ch_Next_Yr_X_RoutineSh3_1 MWSq_Ch_This_Yr_X_RoutineSh3_1 MWSq_Ch_Last_Yr_X_RoutineSh3_1 MWSq_Ch_2Yrs_Ago_X_RoutineSh3_1 LMW_Ch_Next_Yr_X_RoutineSh3_1 LMW_Ch_This_Yr_X_RoutineSh3_1 LMW_Ch_Last_Yr_X_RoutineSh3_1 LMW_Ch_2Yrs_Ago_X_RoutineSh3_1 HMW_Ch_Next_Yr_X_RoutineSh3_1 HMW_Ch_This_Yr_X_RoutineSh3_1 HMW_Ch_Last_Yr_X_RoutineSh3_1 HMW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Emp Effects, Routine Cognitive Share)
estimates table Int0 Int4a Int4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MWSq_Ch_Next_Yr_X_IntSh_1 MWSq_Ch_This_Yr_X_IntSh_1 MWSq_Ch_Last_Yr_X_IntSh_1 MWSq_Ch_2Yrs_Ago_X_IntSh_1 LMW_Ch_Next_Yr_X_IntSh_1 LMW_Ch_This_Yr_X_IntSh_1 LMW_Ch_Last_Yr_X_IntSh_1 LMW_Ch_2Yrs_Ago_X_IntSh_1 HMW_Ch_Next_Yr_X_IntSh_1 HMW_Ch_This_Yr_X_IntSh_1 HMW_Ch_Last_Yr_X_IntSh_1 HMW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Emp Effects, Routine Cognitive Share)

***** Tables B1 ********
estimates table all0 all0_un all0_un2 all0_un3 all0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1) varwidth(30) star(0.1, 0.05, 0.01) title(Overall Effects: Unweighted)
estimates table RCS0 RCS0_un RCS0_un2 RCS0_un3 RCS0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Routine Cognitive Effects: Unweighted)
estimates table RMS0 RMS0_un RMS0_un2 RMS0_un3 RMS0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh2_1 MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) star(0.1, 0.05, 0.01) title(Routine Manual Effects: Unweighted)
estimates table RS0 RS0_un RS0_un2 RS0_un3 RS0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) star(0.1, 0.05, 0.01) title(Routine Effects: Unweighted)
estimates table Int0 Int0_un Int0_un2 Int0_un3 Int0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) star(0.1, 0.05, 0.01) title(Interpersonal Effects: Unweighted)

********************
** Results - SEs**
********************
** Table 2 **
estimates table all0 RCS01 RCS0, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 MW_Ch_Next_Yr_3 MW_Ch_This_Yr_3 MW_Ch_Last_Yr_3 MW_Ch_2Yrs_Ago_3 MW_Ch_Next_Yr_4 MW_Ch_This_Yr_4 MW_Ch_Last_Yr_4 MW_Ch_2Yrs_Ago_4 MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4) varwidth(30) se title(Overall Effects)
** Table 3 **
estimates table RCS0 RMS0 RS0 Int0 NRCA0 NRMP0, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh2_1 MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1 MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2 MW_Ch_Next_Yr_X_NRCogASh_1 MW_Ch_This_Yr_X_NRCogASh_1 MW_Ch_Last_Yr_X_NRCogASh_1 MW_Ch_2Yrs_Ago_X_NRCogASh_1 MW_Ch_Next_Yr_X_NRCogASh_2 MW_Ch_This_Yr_X_NRCogASh_2 MW_Ch_Last_Yr_X_NRCogASh_2 MW_Ch_2Yrs_Ago_X_NRCogASh_2 MW_Ch_Next_Yr_X_NRManPhysSh_1 MW_Ch_This_Yr_X_NRManPhysSh_1 MW_Ch_Last_Yr_X_NRManPhysSh_1 MW_Ch_2Yrs_Ago_X_NRManPhysSh_1 MW_Ch_Next_Yr_X_NRManPhysSh_2 MW_Ch_This_Yr_X_NRManPhysSh_2 MW_Ch_Last_Yr_X_NRManPhysSh_2 MW_Ch_2Yrs_Ago_X_NRManPhysSh_2) varwidth(30) se title(Overall Effects with third Lag)
** Table 4 **
estimates table RCS1 RCS2 RCS3 RCS4 RCS5,  b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_RoutineSh_1 tt_MW_Ch_2Yrs_Ago_X_RoutineSh_1 m0_MW_Ch_2Yrs_Ago_X_RoutineSh_1 c_MW_Ch_2Yrs_Ago_X_RoutineSh_1 p_MW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) se title(Overall Effects)
estimates table RMS1 RMS2 RMS3 RMS4 RMS5, b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_RoutineSh2_1 tt_MW_Ch_2Yrs_Ago_X_RoutineSh2_1 m0_MW_Ch_2Yrs_Ago_X_RoutineSh2_1 c_MW_Ch_2Yrs_Ago_X_RoutineSh2_1 p_MW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) se title(Overall Effects)
estimates table RS1 RS2 RS3 RS4 RS5, b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_RoutineSh3_1 tt_MW_Ch_2Yrs_Ago_X_RoutineSh3_1 m0_MW_Ch_2Yrs_Ago_X_RoutineSh3_1 c_MW_Ch_2Yrs_Ago_X_RoutineSh3_1 p_MW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) se title(Overall Effects)
estimates table Int1 Int2 Int3 Int4 Int5, b(%7.3f) stats(N r2_a)  keep(MW_Ch_2Yrs_Ago_X_IntSh_1 tt_MW_Ch_2Yrs_Ago_X_IntSh_1 m0_MW_Ch_2Yrs_Ago_X_IntSh_1 c_MW_Ch_2Yrs_Ago_X_IntSh_1 p_MW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) se title(Overall Effects)

** Table A2 **
estimates table RCS0 RMS0 RS0 Int0 NRCA0 NRMP0, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_3 MW_Ch_This_Yr_X_RoutineSh_3 MW_Ch_Last_Yr_X_RoutineSh_3 MW_Ch_2Yrs_Ago_X_RoutineSh_3 MW_Ch_Next_Yr_X_RoutineSh_4 MW_Ch_This_Yr_X_RoutineSh_4 MW_Ch_Last_Yr_X_RoutineSh_4 MW_Ch_2Yrs_Ago_X_RoutineSh_4 MW_Ch_Next_Yr_X_RoutineSh2_3 MW_Ch_This_Yr_X_RoutineSh2_3 MW_Ch_Last_Yr_X_RoutineSh2_3 MW_Ch_2Yrs_Ago_X_RoutineSh2_3 MW_Ch_Next_Yr_X_RoutineSh2_4 MW_Ch_This_Yr_X_RoutineSh2_4 MW_Ch_Last_Yr_X_RoutineSh2_4 MW_Ch_2Yrs_Ago_X_RoutineSh2_4 MW_Ch_Next_Yr_X_RoutineSh3_3 MW_Ch_This_Yr_X_RoutineSh3_3 MW_Ch_Last_Yr_X_RoutineSh3_3 MW_Ch_2Yrs_Ago_X_RoutineSh3_3 MW_Ch_Next_Yr_X_RoutineSh3_4 MW_Ch_This_Yr_X_RoutineSh3_4 MW_Ch_Last_Yr_X_RoutineSh3_4 MW_Ch_2Yrs_Ago_X_RoutineSh3_4 MW_Ch_Next_Yr_X_IntSh_3 MW_Ch_This_Yr_X_IntSh_3 MW_Ch_Last_Yr_X_IntSh_3 MW_Ch_2Yrs_Ago_X_IntSh_3 MW_Ch_Next_Yr_X_IntSh_4 MW_Ch_This_Yr_X_IntSh_4 MW_Ch_Last_Yr_X_IntSh_4 MW_Ch_2Yrs_Ago_X_IntSh_4 MW_Ch_Next_Yr_X_NRCogASh_3 MW_Ch_This_Yr_X_NRCogASh_3 MW_Ch_Last_Yr_X_NRCogASh_3 MW_Ch_2Yrs_Ago_X_NRCogASh_3 MW_Ch_Next_Yr_X_NRCogASh_4 MW_Ch_This_Yr_X_NRCogASh_4 MW_Ch_Last_Yr_X_NRCogASh_4 MW_Ch_2Yrs_Ago_X_NRCogASh_4 MW_Ch_Next_Yr_X_NRManPhysSh_3 MW_Ch_This_Yr_X_NRManPhysSh_3 MW_Ch_Last_Yr_X_NRManPhysSh_3 MW_Ch_2Yrs_Ago_X_NRManPhysSh_3 MW_Ch_Next_Yr_X_NRManPhysSh_4 MW_Ch_This_Yr_X_NRManPhysSh_4 MW_Ch_Last_Yr_X_NRManPhysSh_4 MW_Ch_2Yrs_Ago_X_NRManPhysSh_4) varwidth(30) se title(Overall Effects with third Lag)

** Table A3 **
estimates table all1b RCS1b RMS1b RS1b Int1b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_Next_Yr_2 MW_Ch_This_Yr_2 MW_Ch_Last_Yr_2 MW_Ch_2Yrs_Ago_2 NextYr ThisYr LastYr TwoYrsAgo MW_Ch_Next_Yr_X_RoutineSh_2 MW_Ch_This_Yr_X_RoutineSh_2 MW_Ch_Last_Yr_X_RoutineSh_2 MW_Ch_2Yrs_Ago_X_RoutineSh_2 MW_Ch_Next_Yr_X_RoutineSh2_2 MW_Ch_This_Yr_X_RoutineSh2_2 MW_Ch_Last_Yr_X_RoutineSh2_2 MW_Ch_2Yrs_Ago_X_RoutineSh2_2 MW_Ch_Next_Yr_X_RoutineSh3_2 MW_Ch_This_Yr_X_RoutineSh3_2 MW_Ch_Last_Yr_X_RoutineSh3_2 MW_Ch_2Yrs_Ago_X_RoutineSh3_2 MW_Ch_Next_Yr_X_IntSh_2 MW_Ch_This_Yr_X_IntSh_2 MW_Ch_Last_Yr_X_IntSh_2 MW_Ch_2Yrs_Ago_X_IntSh_2) varwidth(30) star(0.1, 0.05, 0.01) title(Effects by Task Content: Earlier Period 1999-2009)

** Table A6 **
estimates table all0 all0_2lead all0_3lead all0_3yr all0_3yr2 all0_3yr2b all0_3yr6 all0_3yr6b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_InThree_Yrs_1 MW_Ch_InTwo_Yrs_1 MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1 MW_Ch_3Yrs_Ago_1) varwidth(30) se title(Overall Effects with 3 Lags/2 Leads)
estimates table RS0 RS0_2lead RS0_3lead RS0_3yr RS0_3yr2 RS0_3yr2b RS0_3yr6 RS0_3yr6b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_InThree_Yrs_X_RoutineSh3_1 MW_Ch_InTwo_Yrs_X_RoutineSh3_1 MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MW_Ch_3Yrs_Ago_X_RoutineSh3_1) varwidth(30) se title(Effects by Routine Tasks  with 3 Lags/2 Leads)
estimates table Int0 Int0_2lead Int0_3lead Int0_3yr Int0_3yr2 Int0_3yr2b Int0_3yr6 Int0_3yr6b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_InThree_Yrs_X_IntSh_1 MW_Ch_InTwo_Yrs_X_IntSh_1 MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MW_Ch_3Yrs_Ago_X_IntSh_1) varwidth(30) se title(Effects by Interpersonal Tasks with 3 Lags/2 Leads)

** Table A11 **
estimates table RCS0 RCS_a1 RCS_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1  MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) se title(Use Common Treatment Period: Routine Cognitive Share) 
estimates table RMS0 RMS_a1 RMS_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh2_1  MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) se title(Use Common Treatment Period: Routine Manual Share) 
estimates table RS0 RS_a1 RS_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh3_1  MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) se title(Use Common Treatment Period: Overall Routine Share) 
estimates table Int0 Int_a1 Int_a2, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) se title(Use Common Treatment Period: Interpersonal Share) 

** Table A12 **
estimates table RCS0 RCS4a RCS4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1 MWSq_Ch_Next_Yr_X_RoutineSh_1 MWSq_Ch_This_Yr_X_RoutineSh_1 MWSq_Ch_Last_Yr_X_RoutineSh_1 MWSq_Ch_2Yrs_Ago_X_RoutineSh_1 LMW_Ch_Next_Yr_X_RoutineSh_1 LMW_Ch_This_Yr_X_RoutineSh_1 LMW_Ch_Last_Yr_X_RoutineSh_1 LMW_Ch_2Yrs_Ago_X_RoutineSh_1 HMW_Ch_Next_Yr_X_RoutineSh_1 HMW_Ch_This_Yr_X_RoutineSh_1 HMW_Ch_Last_Yr_X_RoutineSh_1 HMW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) se title(Overall Emp Effects, Routine Cognitive Share)
estimates table RMS0 RMS4a RMS4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh2_1 MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1 MWSq_Ch_Next_Yr_X_RoutineSh2_1 MWSq_Ch_This_Yr_X_RoutineSh2_1 MWSq_Ch_Last_Yr_X_RoutineSh2_1 MWSq_Ch_2Yrs_Ago_X_RoutineSh2_1 LMW_Ch_Next_Yr_X_RoutineSh2_1 LMW_Ch_This_Yr_X_RoutineSh2_1 LMW_Ch_Last_Yr_X_RoutineSh2_1 LMW_Ch_2Yrs_Ago_X_RoutineSh2_1 HMW_Ch_Next_Yr_X_RoutineSh2_1 HMW_Ch_This_Yr_X_RoutineSh2_1 HMW_Ch_Last_Yr_X_RoutineSh2_1 HMW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) se title(Overall Emp Effects, Routine Cognitive Share)
estimates table RS0 RS4a RS4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1 MWSq_Ch_Next_Yr_X_RoutineSh3_1 MWSq_Ch_This_Yr_X_RoutineSh3_1 MWSq_Ch_Last_Yr_X_RoutineSh3_1 MWSq_Ch_2Yrs_Ago_X_RoutineSh3_1 LMW_Ch_Next_Yr_X_RoutineSh3_1 LMW_Ch_This_Yr_X_RoutineSh3_1 LMW_Ch_Last_Yr_X_RoutineSh3_1 LMW_Ch_2Yrs_Ago_X_RoutineSh3_1 HMW_Ch_Next_Yr_X_RoutineSh3_1 HMW_Ch_This_Yr_X_RoutineSh3_1 HMW_Ch_Last_Yr_X_RoutineSh3_1 HMW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) se title(Overall Emp Effects, Routine Cognitive Share)
estimates table Int0 Int4a Int4b, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1 MWSq_Ch_Next_Yr_X_IntSh_1 MWSq_Ch_This_Yr_X_IntSh_1 MWSq_Ch_Last_Yr_X_IntSh_1 MWSq_Ch_2Yrs_Ago_X_IntSh_1 LMW_Ch_Next_Yr_X_IntSh_1 LMW_Ch_This_Yr_X_IntSh_1 LMW_Ch_Last_Yr_X_IntSh_1 LMW_Ch_2Yrs_Ago_X_IntSh_1 HMW_Ch_Next_Yr_X_IntSh_1 HMW_Ch_This_Yr_X_IntSh_1 HMW_Ch_Last_Yr_X_IntSh_1 HMW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) se title(Overall Emp Effects, Routine Cognitive Share)

***** Tables B1 ********
estimates table all0 all0_un all0_un2 all0_un3 all0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_1 MW_Ch_This_Yr_1 MW_Ch_Last_Yr_1 MW_Ch_2Yrs_Ago_1) varwidth(30) se title(Overall Effects: Unweighted)
estimates table RCS0 RCS0_un RCS0_un2 RCS0_un3 RCS0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh_1 MW_Ch_This_Yr_X_RoutineSh_1 MW_Ch_Last_Yr_X_RoutineSh_1 MW_Ch_2Yrs_Ago_X_RoutineSh_1) varwidth(30) se title(Routine Cognitive Effects: Unweighted)
estimates table RMS0 RMS0_un RMS0_un2 RMS0_un3 RMS0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh2_1 MW_Ch_This_Yr_X_RoutineSh2_1 MW_Ch_Last_Yr_X_RoutineSh2_1 MW_Ch_2Yrs_Ago_X_RoutineSh2_1) varwidth(30) se title(Routine Manual Effects: Unweighted)
estimates table RS0 RS0_un RS0_un2 RS0_un3 RS0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_RoutineSh3_1 MW_Ch_This_Yr_X_RoutineSh3_1 MW_Ch_Last_Yr_X_RoutineSh3_1 MW_Ch_2Yrs_Ago_X_RoutineSh3_1) varwidth(30) se title(Routine Effects: Unweighted)
estimates table Int0 Int0_un Int0_un2 Int0_un3 Int0_un4, b(%7.3f) stats(N r2_a)  keep(MW_Ch_Next_Yr_X_IntSh_1 MW_Ch_This_Yr_X_IntSh_1 MW_Ch_Last_Yr_X_IntSh_1 MW_Ch_2Yrs_Ago_X_IntSh_1) varwidth(30) se title(Interpersonal Effects: Unweighted)

log close

